package com.objectproject.main.dao.mybatis.mapper;

import java.util.ArrayList;

import org.apache.ibatis.annotations.Param;

import com.objectproject.main.model.MyObject;
import com.objectproject.main.model.MyProperty;


public interface MyPropertyMapper {

	public abstract MyProperty semanticSelectMyPropertyOfById(@Param("objectId")long objectId, @Param("propertyId")long propertyId);
	public abstract MyProperty semanticSelectMyPropertyOf(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty);
	
	public abstract MyProperty selectMyPropertyOfById(@Param("objectId")long objectId, @Param("propertyId")long propertyId);
	public abstract MyProperty selectMyPropertyOf(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty);
	
	public abstract MyProperty selectMyPropertyDetailOfById(@Param("objectId")long objectId,@Param("propertyId") long propertyId);
	public abstract MyProperty selectMyPropertyDetailOf(@Param("myProperty") MyProperty myProperty, @Param("localeId") int localeId);
	
	public abstract void insertMyProperty(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty);
	public abstract void overridedInsertMyProperty(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty);
	public abstract void insertMyPropertyLocaleSpecific(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty);
	public abstract void insertMyPropertyDetail(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty, @Param("localeId") int localeId);
	
	public abstract void protectedDeleteMyPropertyById(long propertyId);
	public abstract void protectedDeleteMyPropertyOfById(@Param("objectId")long objectId,@Param("propertyId") long propertyId);
	public abstract void protectedDeleteMyProperty(MyProperty myProperty);
	public abstract void protectedDeleteMyPropertyOf(@Param("myObject")MyObject myObject, @Param("myProperty")MyProperty myProperty);
	
	public abstract void deleteMyPropertyById(long propertyId);
	public abstract void deleteMyPropertyOfById(@Param("objectId")long objectId,@Param("propertyId") long propertyId);
	public abstract void deleteMyProperty(MyProperty myProperty);
	public abstract void deleteMyPropertyOf(@Param("myObject")MyObject myObject, @Param("myProperty")MyProperty myProperty);
	
	public abstract void updateMyProperty(@Param("myObject")MyObject myObject, @Param("myProperty")MyProperty myPropert);
	public abstract void updateMyPropertyDetail(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty, @Param("localeId") int localeId);
	public abstract void updateMyPropertyValue(@Param("myObject") MyObject myObject, @Param("myProperty") MyProperty myProperty, @Param("localeId") int localeId);
	
	//advanced
	public abstract ArrayList<MyProperty> semanticSelectMyProperties(MyObject myObject);
	public abstract ArrayList<MyProperty> selectMyProperties(MyObject myObject);
	public abstract void protectedDeleteMyProperties(MyObject myObject);
	public abstract void deleteMyProperties(MyObject myObject);
	
}
